<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="Preferences">

  <Preference
    android:title="Welcome to Elve Mobile"
    android:summary="Ensure the Elve Touch Service is installed on a computer to establish a connection."
    android:selectable="false" />

        
  <PreferenceCategory
     android:title="Elve Touch Server">
    
    <EditTextPreference
        android:key="pref_serverAddress"
        android:title="Server"
        android:summary="Hostname or IP Address"
        android:dialogTitle="Hostname or IP Address"
    />
    
        <EditTextPreference
        android:key="pref_port"
        android:title="Port"
        android:summary="(Advanced) The port to connect to"
        android:dialogTitle="This is usually 33907."
        android:defaultValue="33907"
        android:inputType="number"
        android:maxLength="5"
    />
     
  </PreferenceCategory>

  <PreferenceCategory
     android:title="User Credentials">
    
    <EditTextPreference
        android:key="pref_username"
        android:title="Username"
        android:summary="Your Elve account username"
        android:dialogTitle="Enter your Elve username"
    />
    
    <EditTextPreference
        android:key="pref_password"
        android:title="Password"
        android:summary="Your Elve account password"
        android:dialogTitle="Enter your password"
        android:inputType="textPassword"
    />
     
  </PreferenceCategory>
  
  <PreferenceCategory
     android:title="Performance">
    
      <ListPreference
          android:title="Image Quality"
          android:summary="Reduce image quality to improve performance and reduce memory use. (Requires Elve 2.0+)"
          android:key="pref_imageQuality"
          android:defaultValue="PNG"
          android:entries="@array/imageQualityTexts"
          android:entryValues="@array/imageQualityValues" />
    
  </PreferenceCategory>
  
  <PreferenceCategory
     android:title="Behavior">
    
    <CheckBoxPreference
        android:key="pref_keepScreenOn"
        android:title="Keep Screen On"
        android:summary="Indicates if the app should keep the screen on while connected."
        android:defaultValue="true"
        />

    <CheckBoxPreference
        android:key="pref_runInBackground"
        android:title="Run in Background"
        android:summary="Indicates if the app stays connected while running in the background."
        android:defaultValue="true"
        />

  </PreferenceCategory>
  
       
  <PreferenceCategory
     android:title="Information">
  
  <Preference
    android:title="Help"
    android:summary="View online manual">

    <intent
      android:action="android.intent.action.VIEW"
      android:data="http://www.codecoretechnologies.com/content/Elve-Mobile-Android.ashx" />

  </Preference>
  
 </PreferenceCategory>
   
</PreferenceScreen>
